package net.hiwii.db.bind;

import com.sleepycat.bind.tuple.TupleBinding;
import com.sleepycat.bind.tuple.TupleInput;
import com.sleepycat.bind.tuple.TupleOutput;

import net.hiwii.state.HasStatement;

public class HasStatementBinding extends TupleBinding<HasStatement> {

	@Override
	public HasStatement entryToObject(TupleInput arg0) {
		HasStatement stm = new HasStatement();
		stm.setName(arg0.readString());
		stm.setNumber(arg0.readInt());
		return null;
	}

	@Override
	public void objectToEntry(HasStatement arg0, TupleOutput arg1) {
		arg1.writeString(arg0.getName());
		arg1.writeInt(arg0.getNumber());
	}

}
